//
//  DestTabBarFourImageCollectionViewCell.m
//  TravelEveryDay
//
//  Created by dlios on 15/10/16.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "DestTabBarFourImageCollectionViewCell.h"
#import "BaseHeader.h"
#import "DestTabBarModel.h"

@implementation DestTabBarFourImageCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.destTabBarImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        _destTabBarImageView.layer.cornerRadius = 10;
        _destTabBarImageView.layer.masksToBounds = YES;
        [self.contentView addSubview:_destTabBarImageView];
        _destTabBarLabel = [[UILabel alloc]initWithFrame:CGRectMake(15 *WIDTH, frame.size.height - 40*HEIGHT , frame.size.height-20 *WIDTH,30*HEIGHT)];
       _destTabBarLabel.textColor = [UIColor colorWithWhite:1.0f alpha:0.8f];
        _destTabBarLabel.shadowColor = [UIColor lightGrayColor];
        _destTabBarLabel.shadowOffset = CGSizeMake(0.5f, 0.5f);
        [self.contentView addSubview:_destTabBarLabel];
        
    }
    return self;
}
#pragma mark - 重写set方法  传值  是首页cell的传值方法
- (void)setDestModel:(DestTabBarModel *)destModel {
    NSURL *url = [NSURL URLWithString:destModel.cover_s ];
    [_destTabBarImageView sd_setImageWithURL:url placeholderImage:PLACEHOLDERIMAGE];
    _destTabBarLabel.text = destModel.name;
}
#pragma mark - 重写set方法 传值  是首页的点击更多国家的cell传值
- (void)setDestMoreCountryModel:(DestTabBarModel *)destMoreCountryModel {
    NSURL *url = [NSURL URLWithString:destMoreCountryModel.cover_s];
    [_destTabBarImageView sd_setImageWithURL:url placeholderImage:PLACEHOLDERIMAGE];
    _destTabBarLabel.text = destMoreCountryModel.name;
}
@end
